FROM ubuntu:focal
RUN sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \
  && apt-get update \
  && apt-get -y install curl tzdata \
  && curl -fsSL https://ollama.com/install.sh | sh \
  && cd /etc && rm -f localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai localtime \
  && apt-get clean && rm -rf /var/lib/apt/lists/*
EXPOSE 11434
ENTRYPOINT ["/usr/local/bin/ollama", "start"]
